package info.pixstone.foodhunter.domain.entity;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import info.pixstone.foodhunter.acquaintance.IALocation;

import info.pixstone.foodhunter.acquaintance.IARestaurant;
@PersistenceCapable
public class ERestaurant implements IARestaurant
{
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)	
	private Key key;
	
	@Persistent
	private int RID;
	
	@Persistent
	private double RVersion;
	
	@Persistent
	private String RName;
	
	@Persistent
	private int RType;
	
	@Persistent
	private int PID;
	
	@Persistent
	private String RTel;
	
	@Persistent
	private IALocation RLocation;		
	
	//Constructor
	public ERestaurant(){}
	
		
	public ERestaurant(int rID, double rVersion, String rName, int rType,
			int pID, String rTel, IALocation rLocation) {
		super();
		RID = rID;
		RVersion = rVersion;
		RName = rName;
		RType = rType;
		PID = pID;
		RTel = rTel;
		RLocation = rLocation;
	}


	public Key getKey() {
		// TODO Auto-generated method stub
		return key;
	}
	
	@Override
	public void setRID(int rid) {
		// TODO Auto-generated method stub
		this.RID=rid;		
	}

	@Override
	public void setResVersion(double version) {
		// TODO Auto-generated method stub
		this.RVersion=version;
	}

	@Override
	public void setResName(String name) {
		// TODO Auto-generated method stub
		this.RName=name;
	}

	@Override
	public void setResType(int type) {
		// TODO Auto-generated method stub
		this.RType=type;
	}

	@Override
	public void setPhotoID(int pid) {
		// TODO Auto-generated method stub
		this.PID=pid;
	}

	@Override
	public void setResTel(String tel) {
		// TODO Auto-generated method stub
		this.RTel=tel;
	}

	@Override
	public void setLocation(IALocation location) {
		// TODO Auto-generated method stub
		this.RLocation=location;
	}

	
	@Override
	public int getRID() {
		// TODO Auto-generated method stub
		return this.RID;
	}

	@Override
	public double getResVersion() {
		// TODO Auto-generated method stub
		return this.RVersion;
	}

	@Override
	public String getResName() {
		// TODO Auto-generated method stub
		return this.RName;
	}

	@Override
	public int getResType() {
		// TODO Auto-generated method stub
		return this.RType;
	}

	@Override
	public String getResTel() {
		// TODO Auto-generated method stub
		return this.RTel;
	}

	@Override
	public IALocation getLocation() {
		// TODO Auto-generated method stub
		return this.RLocation;
	}

	@Override
	public int getResPhotoID() {
		// TODO Auto-generated method stub
		return this.PID;
	}

}
